﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace AutoNyaa.Logic.Entities
{
    [Serializable]
    public class Item
    {
        [XmlElement("title")]
        public string Title { get; set; }

        [XmlElement("category")]
        public string Category { get; set; }

        [XmlElement("link")]
        public string Link { get; set; }

        [XmlElement("guid")]
        public string Guid { get; set; }

        [XmlElement("description")]
        public string Description { get; set; }

        [XmlElement("pubDate")]
        public string PublishDateString { get; set; }

        [XmlIgnore]
        public DateTime PublishDate
        {
            get
            {
                return DateTime.Parse(PublishDateString);
            }
            set
            {
                PublishDateString = value.ToString();
            }
        }
    }
}